package com.example.lib_base

import com.google.gson.Gson
import okhttp3.MediaType.Companion.toMediaTypeOrNull
import okhttp3.RequestBody

open class BaseRepo {
    fun mapToJson(map: Map<String, Any>): RequestBody {
        val json = Gson().toJson(map)
        return RequestBody.create("application/json".toMediaTypeOrNull(), json)
    }
}